//
//  GetDeviceIDPlugin.m
//  PCDBankSix
//
//  Created by APPLE on 2023/8/21.
//

#import "GetDeviceIDPlugin.h"

@implementation GetDeviceIDPlugin

- (void)handler:(id)data andContext:(PCDContext *)context ResponseCallback:(WVJBResponseCallback )responseCallback{
        
    NSDictionary *dictData = (NSDictionary *)data;
    NSString *strCallback = dictData[@"success"];
    NSString *deviceId = [PCDUtil safeString:[PCDDevice uniqueIdentifier]];
    NSDictionary *dict = @{
                           @"deviceId":deviceId
                           };
    
    
    evaluateJavaScriptOnMainThread(self, strCallback, [dict JSONRepresentation]);
    
}
-(NSString *)getIDFV{
   return [[UIDevice currentDevice] identifierForVendor].UUIDString;
}

@end
